<?php echo form_open('training/search', array('class'=>'form-search'));?>
  <div class="input-append">
    <input type="text" name="searchtraining" class="span2 search-query" />
    <button type="submit" class="btn">Search</button>
  </div>
<?php echo form_close();?>
<?php 
$i = 1;
if ($this->session->flashdata('message')){
	echo "<div class='message'>".$this->session->flashdata('message')."</div>";
}
if (count($profiles)){

?>
<table class="table table-bordered table-striped table-hover tablesorter">
  <caption></caption>
   <thead>
	    <tr>
	    	<th>#</th>
            <th>Name</th>
            <th>Position</th>
            <th>Team</th>
            <th>Address</th>
            <th>Phone</th>
	    </tr>
	</thead>
  <tbody>
  	<?php 
		foreach ($profiles as $key => $list){
			echo "<tr valign='top'>";
            echo "<td>";
            echo $i;
            echo "</td>";
			echo "<td>";
			echo anchor('training/viewtraining/'.$list['StaffID'],$list['FirstName']."  ".$list['LastName']);
            echo "</td>";
            echo "<td>";
			echo $list['Title'];
            echo "</td>";
            echo "<td>";
			echo $list['TeamName'];
            echo "</td>";
            echo "<td>";
			echo $list['CurrentAddress'];
            echo "</td>";
            echo "<td>";
			echo $list['PhoneNumber'];
            echo "</td>";
			echo "</tr>";
			$i++;
		}
  	?>
  </tbody>
</table>
<?php }?>
<strong style="float:right;padding-right:5px">Number of record(s): <?php echo ($i-1)?></strong>
<div id="pager" class="pager">
  <form>
    <img src="<?php echo base_url();?>images/first.gif" class="first"/>
    <img src="<?php echo base_url();?>images/prev.gif" class="prev"/>
    <input type="text" class="span1 pagedisplay"/>
    <img src="<?php echo base_url();?>images/next.gif" class="next"/>
    <img src="<?php echo base_url();?>images/last.gif" class="last"/>
    <select class="pagesize">
      <option selected="selected" value="10">10</option>
      <option value="20">20</option>
      <option value="30">30</option>
      <option value="40">40</option>
      <option value="50">50</option>
    </select>
  </form>
</div>
